package com.qf.servlet;

import java.io.IOException;

/**
 * @author mkr
 * @version V1.0
 * @Project java2203-mkr
 * @Package ${PACKAGE_NAME}
 * @Description: ${TODO}
 * @Date 2022/5/30 20:59
 */
@javax.servlet.annotation.WebServlet("/hello")
public class HelloServlet extends javax.servlet.http.HttpServlet {
    protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        System.out.println("HolleWorld!!!");
        //重定向到首页
        response.sendRedirect("/index.jsp");
    }

    protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        doPost(request, response);
    }
}
